<?php include 'app/common/templates/header.php' ?>
<?php include 'pagelets/templates/commonmenu.php' ?>

<script type="text/javascript">
var JSONRPC_URL = '<?= $this->JSONRPC_URL ?>';

Event.observe(window, 'load', function() {
	$('addButton').observe('click', function(event) {
		$('action').value = 'AddButtonClicked';
		Event.element(event).form.submit();
	});
});
</script>


<p>
<div>
<pre>
</pre>
<form <?= $this->mainadd->attributes ?>>
<?= $this->mainadd->action->html ?>

<table>
<tr><td class="formLabel"><?= $this->mainadd->firstName->label ?></td><td><?= $this->mainadd->firstName->html ?> <span class="error"><?= $this->mainadd->firstName->error ?></span></td></tr>
<tr><td class="formLabel"><?= $this->mainadd->lastName->label ?></td><td><?= $this->mainadd->lastName->html ?> <span class="error"><?= $this->mainadd->lastName->error ?></span></td></tr>
<tr><td class="formLabel"><?= $this->mainadd->gender->label ?></td><td><?= $this->mainadd->gender->html ?> <span class="error"><?= $this->mainadd->gender->error ?></span></td></tr>
<tr><td class="formLabel"><?= $this->mainadd->birthDate->label ?></td><td><?= $this->mainadd->birthDate->html ?> <span class="error"><?= $this->mainadd->birthDate->error ?></span></td></tr>
<tr><td class="formLabel"><?= $this->mainadd->deathDate->label ?></td><td><?= $this->mainadd->deathDate->html ?> <span class="error"><?= $this->mainadd->deathDate->error ?></span></td></tr>
</table>
<p>
<?= $this->mainadd->addButton->html ?>
</form>
</div>

<?php include 'app/common/templates/footer.php' ?>
